{% load custom_filters %}

<td>
    <button type="button" class="btn btn-primary btn-sm radius-30 px-4" data-toggle="modal" data-target=".bd-example-modal-lg{{ mydds.ddh }}">详情</button>
{#    <a href="{% url 'kehudd_delete' khid=khxq.id pk=dingdan.id %}" type="button" class="btn btn-primary">删除</a>#}


    <div class="modal fade bd-example-modal-lg{{ mydds.ddh }}" tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel" aria-hidden="true">
  <div class="modal-dialog modal-lg" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="exampleModalLabel">订单详情</h5>
        <button type="button" class="close" data-dismiss="modal" aria-label="Close">
          <span aria-hidden="true">&times;</span>
        </button>
      </div>
      <div class="modal-body">
<div class="container">
    <div class="row">
            <table class="table">
  <thead>
    <tr>
      <th scope="col">订单号</th>
      <th scope="col">订单创建时间</th>
      <th scope="col">订单归属</th>
      <th scope="col">订单客户</th>
      <th scope="col">订单产品</th>
      <th scope="col">订单金额</th>
      <th scope="col">订单毛利</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <th>{{ dingdan.ddh }}</th>
      <td>{{ dingdan.ddtime }}</td>
      <td>{{ dingdan.dduser.last_name }}{{ dingdan.dduser.first_name }}</td>
      <td>{{ dingdan.kehu }}</td>
      <td>
          {% for foo in dingdan.ddchanpin.all %}
          {{ foo }}
          {% endfor %}
      </td>
      <td>{{ dingdan.ddjine }}</td>
      <td>
          {% for foo in dingdan.ddchanpin.all %}
              {{ mydds.ddjine|sub:foo.cbj }}
          {% endfor %}

          </td>
    </tr>


  </tbody>
</table>
    </div>
<div class="row">

</div>

</div>

      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
{#        <button type="button" class="btn btn-primary">Save changes</button>#}
      </div>
    </div>
  </div>
</div>
</td>




<!-- Modal -->
